function getInputSomething() {
  return '1341534';
}

function loadFromDatabase(id) {
  if (isNaN(id)) return;
  // .. load from database
  return {
    id,
    name: 'John',
    age: 20,
  };
}


let s = getInputSomething();
let id = parseInt(s); // NaN

let { name, age } = loadFromDatabase(id);
console.log(name, age);